package logic

import (
	"context"
	"zk1/common/proto/goods"
	"zk1/rpc/server"
)

type GoodsRegister struct {
	goods.UnimplementedGoodsServer
}

func (g GoodsRegister) Create(ctx context.Context, in *goods.CreateRequest) (*goods.CreateResponse, error) {
	create, err := server.Create(in)
	if err != nil {
		return nil, err
	}
	return create, nil
}

func (g GoodsRegister) List(ctx context.Context, in *goods.ListRequest) (*goods.ListResponse, error) {
	list, err := server.List(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
